package com.ssy.lingxi.order.model.vo.basic.request;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 订单商品关联的积分抵扣
 * @author wyx
 * @version 2.0.0
 * @date 2022-03-02
 **/
public class OrderDeductionVO implements Serializable {
    private static final long serialVersionUID = -8806507866508989230L;

    /**
     * 积分归属的供应会员（店铺）Id
     */
    @NotNull(message = "积分归属的供应会员Id不能为空")
    private Long vendorMemberId;

    /**
     * 积分归属的供应会员（店铺）角色Id
     */
    @NotNull(message = "积分归属的供应会员角色Id不能为空")
    private Long vendorRoleId;

    /**
     * 供应商会员名称
     */
    @NotEmpty(message = "供应商会员名称不能为空")
    private String vendorName;

    /**
     * 积分类型：0=平台；1=会员
     */
    @NotNull(message = "积分类型枚举不能为空")
    private Integer relType;

    /**
     * 消费的积分
     */
    @NotNull(message = "消费的积分要大于0")
    @Positive(message = "消费的积分要大于0")
    private Integer usedPoint;

    /**
     * 积分抵扣金额比例
     */
    @NotNull(message = "积分抵扣金额比例要大于0")
    @Positive(message = "积分抵扣金额比例要大于0")
    private BigDecimal deductionRate;

    /**
     * 本单积分可抵扣金额
     */
    @NotNull(message = "可抵扣金额要大于0")
    @Positive(message = "可抵扣金额要大于0")
    private BigDecimal amount;

    public Long getVendorMemberId() {
        return vendorMemberId;
    }

    public void setVendorMemberId(Long vendorMemberId) {
        this.vendorMemberId = vendorMemberId;
    }

    public Long getVendorRoleId() {
        return vendorRoleId;
    }

    public void setVendorRoleId(Long vendorRoleId) {
        this.vendorRoleId = vendorRoleId;
    }

    public String getVendorName() {
        return vendorName;
    }

    public void setVendorName(String vendorName) {
        this.vendorName = vendorName;
    }

    public Integer getRelType() {
        return relType;
    }

    public void setRelType(Integer relType) {
        this.relType = relType;
    }

    public Integer getUsedPoint() {
        return usedPoint;
    }

    public void setUsedPoint(Integer usedPoint) {
        this.usedPoint = usedPoint;
    }

    public BigDecimal getDeductionRate() {
        return deductionRate;
    }

    public void setDeductionRate(BigDecimal deductionRate) {
        this.deductionRate = deductionRate;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }
}
